home *** CD-ROM | disk | FTP | other *** search
/ Java for 3D & VRML Worlds / Java for 3d and VRML Worlds.iso / examples / chap02 / chair.wrl < prev    next >
Text File  |  1996-10-15  |  1KB  |  66 lines

  1. #VRML Draft #3 V2.0 utf8
  2. #
  3. # chair.wrl
  4. #
  5.  
  6. Background{
  7.    skyColor 0 0.3 0.8
  8. }
  9.  
  10. DEF Chair Transform {
  11.    translation 0 -2 10
  12.    children [
  13.       Transform {
  14.          translation 0.5 0.5 0.5
  15.          children [
  16.             DEF SEAT Shape {
  17.                appearance Appearance {
  18.                   material Material { diffuseColor 0 1 0 }
  19.                }
  20.                geometry  Box { size 1 0.1 1 }
  21.             }
  22.          ]
  23.       }
  24.       DEF LEG Transform {
  25.          children [
  26.             Shape {
  27.             appearance Appearance { 
  28.                material Material { 
  29.                   diffuseColor 0 0 1
  30.                }
  31.             }
  32.             geometry Cylinder {
  33.                height 1 radius .1
  34.             }
  35.             }
  36.          ]
  37.       }
  38.       Transform {
  39.          translation 0 0 1
  40.          children [
  41.             USE LEG
  42.          ]
  43.       }
  44.       Transform {
  45.          translation 1 0 0
  46.          children [
  47.             USE LEG
  48.          ]
  49.       }
  50.       Transform {
  51.          translation 1 0 1
  52.          children [
  53.             USE LEG
  54.          ]
  55.       }
  56.    ] # end of children for chair
  57. }
  58. DEF BACK Transform {
  59.          translation  0.5 -1 9.7
  60.          rotation 1 0 0 1.2
  61.          children [
  62.             USE SEAT
  63.          ]
  64.       }
  65.  
  66.